/** 查询在线用户列表 */
export function listOnlineApi(query: OnlineRecord): Promise<ApiRowsRecord<OnlineRecord[]>> {
  return request({
    url: `monitor/online/list`,
    method: 'get',
    params: query
  });
}

/** 查询在线用户详细 */
export function getOnlineApi(id: number): Promise<ApiDataRecord<OnlineRecord>> {
  return request({
    url: `monitor/online/${id}`,
    method: 'get'
  });
}

/** 新增在线用户 */
export function addOnlineApi(data: OnlineRecord): Promise<ApiRecord> {
  return request({
    url: "monitor/online",
    method: 'post',
    data: data
  });
}

/** 修改在线用户 */
export function updateOnlineApi(data: OnlineRecord): Promise<ApiRecord> {
  return request({
    url: "monitor/online",
    method: 'put',
    data: data
  });
}

/** 删除在线用户 */
export function delOnlineApi(id: number[]): Promise<ApiRecord> {
  return request({
    url: `monitor/online/${id}`,
    method: 'delete',
  });
}